﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Administration;

namespace TSB.FarmPowerShellWizard.Repository
{
    public class SiteCollectionRepository
    {
        public List<string> GetSiteCollections()
        {
            var siteCollections = new List<string>();
            foreach (var wa in SPWebService.ContentService.WebApplications)
            {
                foreach (SPSite sc in wa.Sites)
                {
                    siteCollections.Add(sc.Url);
                }
            }

            return siteCollections;
        }
    }
}
